package main
import "fmt"

func main(){
	//定义一个切片
	slice := make([]int,5,10)
	slice[0] = 66
	slice[1] = 88
	slice[2] = 99
	slice[3] = 60

	//for
	for i := 0;i <len(slice);i++{
		fmt.Printf("切片slice[%d]的值为：%d \n",i,slice[i])
	}

	fmt.Println("-------------------------------")

	//for range
	for i,v := range slice{
		fmt.Printf("切片slice[%d]的值为：%d \n",i,v)
	}
}